
public class Tester {
	public static void main(String[] args) {
		
		short testVar1 = 32000;
		System.out.println("short testVar1 is... " + testVar1);
		//testVar1 = 33000;
		// You can't go from an int > 32767 or < -32768 than to a short type
		
		System.out.println();
		
		long testVar2 = 1;
		System.out.println("Long testVar2 value is... " + testVar2);
		//int testVar3 = testVar2;
		// You cannot go from a long type to an int type
		int testVar3 = (int) testVar2;
		System.out.println("Integer testVar3 value is... " + testVar3);
		// You must down cast the long type to an int type
		
		System.out.println();
		
		final double PI = 3.14159265358979;
		System.out.println("PI = " + PI);
		//PI = -9.8;
		// You cannot change a constant
		
		System.out.println();
		
		int testVar4 = 10;
		System.out.println("testVar4 is... " + testVar4);
		testVar4++;
		System.out.println("testVar4 is now... " + testVar4);
		testVar4--;
		System.out.println("testVar4 is now... " + testVar4);
		
		System.out.println();
		
		final double presentValue = 300000.00;
		final double interestRate = .0485;
		final int numberOfYears = 30;
		double futureValue = presentValue * Math.pow((1 + (interestRate/100)), numberOfYears);
		System.out.println(futureValue + " = " + presentValue + " x " + "(1 + ( " + interestRate + " / 100))^" + numberOfYears);
		
		System.out.println();
		
		int testVar5 = 5;
		int testVar6 = 2;
		double testVar7 = 4.0;
		
		System.out.println(testVar5 + " + " + testVar6 + " = " + (testVar5 + testVar6));
		System.out.println(testVar5 + " + " + testVar7 + " = " + (testVar5 + testVar7));
		System.out.println(testVar5 + " - " + testVar6 + " = " + (testVar5 - testVar6));
		System.out.println(testVar5 + " - " + testVar7 + " = " + (testVar5 - testVar7));
		System.out.println(testVar5 + " x " + testVar6 + " = " + (testVar5 * testVar6));
		System.out.println(testVar5 + " x " + testVar7 + " = " + (testVar5 * testVar7));
		System.out.println(testVar5 + " / " + testVar6 + " = " + (testVar5 / testVar6));
		System.out.println(testVar5 + " / " + testVar7 + " = " + (testVar5 / testVar7));
		// Any time a decimal is used, the result is a decimal
		// If one integer does not fully divide into another, the decimal is left off
		
		System.out.println();
		
		double testVar8 = -9.8;
		System.out.println("The closest integer value of " + testVar8 + " is... " + Math.round(testVar8));
		
		double testVar9 = 2.71;
		System.out.println("The highest integer value of " + testVar9 + " is... " + Math.ceil(testVar9));
		
		double testVar10 = 3.14; 
		System.out.println("The lowest integer value of " + testVar10 + " is... " + Math.floor(testVar10));
		
		int testVar11 = -1; 
		System.out.println("The absolute value of " + testVar11 + " is... " + Math.abs(testVar11));
		
		System.out.print("The largest number in the group of " + testVar9 + ", and " + testVar11 + " is... ");
		System.out.println(Math.max(testVar9, testVar11));
		
		System.out.print("The smallest number in the group of " + testVar9 + ", and " + testVar11 + " is... ");
		System.out.println(Math.min(testVar9, testVar11));
		
		int testVar12 = 100;
		String outputString = "The largest number in the group of " + testVar9 + ", " + testVar11 + ", and " + testVar12 + " is... ";
		outputString = outputString + (Math.max((Math.max(testVar9, testVar11)), testVar12));
		System.out.println(outputString);
		System.out.print("The above string length is: " + outputString.length() + " characters.\n");
		
		//System.out.println(outputString.charAt((outputString.length() + 1)));
		//An error occurs with a "StringIndexOutOfBoundsException" error.
		
	}
}
